﻿@page
@model Damselfly.Areas.Identity.Pages.Account.LoginModel

@{
    ViewData["Title"] = "Log In To Damselfly";
}

<h1>@ViewData["Title"]</h1>

<div class="login-container">
    <div class="login-fieldset">
        <form asp-route-returnUrl="@Model.ReturnUrl" method="post">
            <div class="login-fieldrow">
                <label asp-for="Input.Email" class="login-fieldlabel"></label>
                <input asp-for="Input.Email" placeholder="Email" class="login-fieldcontrol"/>
                <span asp-validation-for="Input.Email" class="text-danger"></span>
            </div>
            <div class="login-fieldrow">
                <label asp-for="Input.Password" class="login-fieldlabel"></label>
                <input asp-for="Input.Password" placeholder="Password" class="login-fieldcontrol"/>
                <span asp-validation-for="Input.Password" class="text-danger"></span>
            </div>
            <div class="login-fieldrow">
                <div class="checkbox">
                    <label asp-for="Input.RememberMe" class="login-fieldcontrol">
                        @Html.DisplayNameFor(m => m.Input.RememberMe)
                    </label>
                    <input asp-for="Input.RememberMe" class="login-fieldcontrol"/>
                </div>
            </div>
            <div asp-validation-summary="All" class="text-danger"></div>
            <div class="login-fieldrow">
                <button type="submit" class="btn btn-primary btn-login">Login</button>
            </div>
            <hr/>
            <div class="login-fieldrow">
                <div class="login-fieldcontrol">
                    <a href="~/Identity/Account/ForgotPassword">I forgot my password</a>
                    @if( Model.CanRegister )
                    {
                        <a href="~/Identity/Account/Register">Create a new account</a>
                    }
                </div>
            </div>
        </form>
    </div>
</div>

@section Scripts {
    <partial name="_ValidationScriptsPartial"/>
}